package scoutobahn.dijkstra;

import scoutobahn.highway.Highway;
import scoutobahn.highway.HighwayNode;

/**
* A DijkstraNode is a HighwayNode with the Distance to the StartNode.
* @author Richard, Antonio
*
*/
public class DijkstraNode {
    private HighwayNode node;
    private double distanceToStart;
    private Highway highway;
    /**
     * Constructs a new DijkstraNode.
     * @param newNode the Node will be assumed by the DijkstraNode
     * @param distance the Distance from the Node to the Node where the
     * Dijkstra begins
     * @param pHighway the Highway the Node is on
     */
    public DijkstraNode(final HighwayNode newNode, final double distance,
            final Highway pHighway) {
        this.node = newNode;
        this.distanceToStart = distance;
        this.highway = pHighway;
    }

    /**
     * Returns the Distance to the Node where the Dijkstra begins.
     * @return Double which is the distance between the Node and the StartNode
     */
    public double getDistanceToStart() {
        return distanceToStart;
    }

    /**
     * Returns its Node as HighwayNode.
     * @return node
     */
    public HighwayNode getHighwayNode() {
        return node;
    }

    /**
     * Returns the Highway the Node is on.
     * @return Highway the Node is on
     */
    public Highway getHighway() {
        return highway;
    }
}
